home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
telecomm
/
378
/
hagtrm33
/
hagscrpt.txt
next >
Wrap
Text File
|
1978-02-04
|
64KB
|
2,443 lines
HagTerm Elite
HagScript Manual
---------------------
by Hagop Janoyan
Version 3.1 Beta
Officially Released November 1989
This version was released:
November 1989
Copyright 1989 by Hagop Janoyan
This documentation was last revised on:
November 23, 1989
WARNING: I retain all rights to this program and its source code.
This program may be distributed freely for trial purposes ONLY.
-- HagScript Manual -- ( 1 )
INTRODUCTION
In HagTerm Elite, you have access to over 90 commands, called
"HagScript" commands. These HagScript commands replace some of
Hagterm Elite's functions which would otherwise require you to use
the mouse to access them. They also allow you to automate a
series of functions by using HagScript commands. For example, you
could design your own menus which would allow you or another user
to press one key and specify a filename; thereafter, the HagScript
would automatically log-on to a BBS and download that file at a
specified time.
The "AUTO-LOG" function of the Dialer also uses HagScript
commands to automatically log-on to a BBS using the specified
"WAIT/ANSWER" strings.
-- HagScript Manual -- ( 2 )
CONSTRUCTION
Every HagScript command consists of one key word, plus a
different number of parameters seperated by the character "|".
For example, the HagScript command:
PRINT 5|10|Hi There!
consists of the keyword "PRINT", plus three parameters: "5", "10",
and "Hi There!". (NOTE: This command would print the string "Hi
There!" at the x position 5 and y position 10. Please see the
list of HagScript commands for an explanation)
Furthermore, each parameter can consist of a variable.
HagScript has three types of variables; System Variables, String
Variable, and Numerical Variable. They all can be used not only
in HagScript commands, but also in Macros, Auto-Log (through the
Dial mode), etc. (best thing to do is to investigate!).
1) System Variables
System variables consist of 80 different possible variables.
They are _not_ user-definable, but rather are defined
automatically by HagTerm Elite. They include information
such as the current cursor position, the current default disk
path, etc. They can be asscesed through the following
manner: You must enclose the variable name with ~# and #.
The variable consist of word or words, such as TIME,
DIAL.CODE, etc. There is no case distinction; therefore Time
and TIME are the same system variables. Here is an example:
PRINT ~#CURSOR.X#|10|This is a test...
would consist of the keyword "PRINT" plus three parameters;
the first parameter is the System Variable CURSOR.X (which is
the current X position of the cursor), the second parameter
is the string "10", and the third parameter is the string
"This is a test...".
2) String Variables
A String variable is similar to a System variable, except
that they are user definable and the variable names consist
of only letters from A to Z. You can define a String
variable by using the "LET" command, discussed in the next
section. A String variable can contain any characters,
including letters, digits, CONTROL characters, punctuation,
etc. Basically, it can contain any valid ASCII character.
A String variable can be specified in a parameter by
enclosing it in the characters "}" and "{". For example, the
HagScript commands:
LET }A{|Atari ST
-- HagScript Manual -- ( 3 )
LET }C{|use it carefully
PRINT 10|20|This is a }A{ system, so please }C{.
would first define the String variable "A" to contain the
string "Atari ST", and the String variable "C" to contain
"use it carefully. Then, the third command would display the
following string: "This is a Atari ST system, so please use
it carefully."
3) Numerical Variables
A Numerical variable is similar to a String variable.
However, like the name implies, it can only contain numerical
values. Like the String variable, valid Numerical variable
names include all letters from A to Z.
Unlike a String variable, a Numerical variable is specified
in a parameter by enclosing it with the characters "]" and
"[". Attempting to define a Numerical variable a string
which consists of letters will not produce an error.
Instead, that Numerical variable will contain the value "0".
For example, the HagScript commands:
LET ]A[|50
LET ]B[|3*]A[
LET ]C[|TEST!
PRINT 10|10|The value for B is: ]B[
PRINT 10|11|The value for C is: ]C[
would first define the Numerical variable A to be equal to
50. Numerical variable B would equal 3*A, or 3*50, or 150.
Later, the third command attempts to define Numerical
variable C to be equal to the string "TEST!". However,
Numerical variable C would become equal to 0 instead. The
fourth command prints the text "The value for B is: 150",
following by the fifth command which prints the text "The
value for C is: 0".
-- HagScript Manual -- ( 4 )
LIST OF PRE-DEFINED SYSTEM VARIABLES
The following are System variable names which are defined
automatically by Hagterm Elite. You can use them in your command
parameters, but they cannot be user defined.
Serial Port Settings:
---------------------
LINEFEED Linefeed status
DUPLEX Duplex status
CHAR Char Length
STOPBITS Stop Bits
FLOW Flow Control
BAUD Current Baud Rate
Dialing Method Settings:
------------------------
DIAL.LOG Dialing Method, use Auto-log when dialing
DIAL.AUTODIAL Dialing Method, autodial
DIAL.CONFIG Dialing Method, configure when dialing
DIAL.AUTO.SCRIPT Dialing Method, Autodial and load Script status
DIAL.AUTO.DEFAULT Dialing Method, Autodial and load Defaults status
DIAL.AUTO.REDIAL Dialing Method, Autodial and Redial status
DIAL.AUTO.MULTI Dialing Method, Autodial and dial multiple items
OTHER SETTINGS:
---------------
BUFFER Capture to Buffer status
OTHER:
------
MODE The current mode the user is in: 0 - Main Menu
1 - Terminal Mode 2 - Editor Mode
CURSOR.X Current X position of cursor
CURSOR.Y Current Disk Directory/Path
PATH The current and default Directory/Path
PASS The Password of the last dialed Item
USER The Username of the last dialed Item
TIME Current System Time
DATE Current Date Time
WAIT See below for the keyword WAIT
INPUT The string for a user input - Please see the commands
INPUT, INKEY, and FILESELECT below
WAIT.TIME The time to wait for specified through the
command WAITTIME
WAIT.DATE The date to wait for specified through the command
WAITDATE
GRAPHICS:
---------
DRAW.0 >
DRAW.1 >
DRAW.2 > Please see the command DRAW below
DRAW.4 >
DRAW.5 >
-- HagScript Manual -- ( 5 )
LIST OF VALID KEYWORDS
1 KEYWORD: PRINT
PARAMETERS: 1) X position
2) Y position
3) String to be printed
EXPLANATION: Prints a string to the screen at the character
position of X (column) and Y (row).
EXAMPLES: PRINT 5|6|Hi there!
(Prints the string "Hi there!" to the screen at X
position 5 and Y position 6)
PRINT ~#CURSOR.X#|~#CURSOR.Y#|This is a string...
(Prints the string "This is a string..." to the
screen at the current cursor position)
SPECIAL NOTES: This command moves the current cursor position to
the position at the END of the string printed.
This is similar to GFA Basic's PRINT AT command.
------------------------------------------------------------------
KEYWORD: WAIT
PARAMETERS: 1) String to wait for
2) Maximum time to wait for; in 50th of a second.
EXPLANATION: Halts the HagScript execution until the specified
string is found from the serial port. If it is not
found within the maximum time specified, then the
command is aborted. If the specified time is 0
seconds, then the command will NOT abort until the
string is found.
If the String is not found within the specified
time, then the system variable WAIT will contain the
value 0; otherwise, it will contain the value 1.
EXAMPLES: WAIT Enter user Name|500
IF ~#WAIT#~|=|1|PRINT 1|1|String is found!
(Waits until the string "Enter user Name" is found,
or until 10 seconds have passed.)
WAIT Password|0
-- HagScript Manual -- ( 6 )
(Waits until the string "Password" is found)
------------------------------------------------------------------
KEYWORD: DELAY
PARAMETERS: 1) 100th of a second to pause
EXPLANATION: Delays the execution of further HagScript commands.
However, all other functions, such as input/output
from the modem, will perform. Only further
HagScript commands will be delayed.
EXAMPLES: DELAY 650
PRINT 5|5|Hi There!
(Waits 6.5 seconds, then prints the string "Hi
There!" to the screen.)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: MODE
PARAMETERS: 1) Mode number
EXPLANATION: Switch to the specified Mode
Mode 0: Main Menu
Mode 1: Terminal Mode
Mode 2: Editor Mode
Mode 3: Dial Mode
EXAMPLES: MODE 1
(Switch to Terminal Mode)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: KEYPRESS
PARAMETERS: 1) String
EXPLANATION: Simulates a keypress of the specified characters in
the string.
EXAMPLES: KEYPRESS been
(equivalent of pressing the "b" key, and then the
"e" key twice, and then the "n" key on the keyboard)
SPECIAL NOTES: Within the string, the characters "&&" will sound
a single Bell, and the characters "~~" will pause
-- HagScript Manual -- ( 7 )
for half a second.
EXAMPLE: KEYPRESS the bell && now a pause ~~ ok
(Simulates the keypresses "the bell ", then a
bell is sounded, then the keypresses " now a
pause " is simulated, followed by half a
one second pause, then the keypresses " ok" is
simulated.)
------------------------------------------------------------------
KEYWORD: OUT
PARAMETERS: 1) String
EXPLANATION: Sends out through the modem the specified string.
EXAMPLES: OUT example
(sends out the string "example" to the modem)
SPECIAL NOTES: Within the string, the characters "&&" will sound
a single Bell, and the characters "~~" will pause
for half a second.
EXAMPLE: OUT the bell && now a pause ~~ ok
(Sends out to the modem the string "the bell
", then a bell is sounded, then the string
" now a pause " is sent, followed by half
a one second pause, then the string " ok"
is sent to the modem.)
------------------------------------------------------------------
KEYWORD: PAUSE
PARAMETERS: 1) 100th of a second to pause
EXPLANATION: Pauses for the specified time. During pause, no
further HagScript commands will be executed till
after the specified time. Also, during pause, no
action will take place, such as input or output from
modem, switching modes, etc.
EXAMPLES: PAUSE 400
PRINT 10|15|Hi!
(Pauses for 4 seconds, after which it will display
the string "Hi!" on the screen.)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: TERMINAL
-- HagScript Manual -- ( 8 )
PARAMETERS: none
EXPLANATION: Switches to Terminal mode
EXAMPLES: TERMINAL
(Switch to Terminal Mode)
SPECIAL NOTES:
------------------------------------------------------------------
1 KEYWORD: INPUT
PARAMETERS: 1) Number of characters allowed
2) Default string
EXPLANATION: Prompts the user for an input of a string of
specified length. The user must press a [RETURN] to
accept his input. The default string will initially
be displayed, which the user can edit.
The accepted input string is then available for use
by HagScript under the System variable INPUT.
EXAMPLES: INPUT 30|You can edit this input
PRINT 10|15|~#INPUT#
(Prompts the user for an input for a string of 30
characters. The string "You can edit this input" is
initially shown and can be editted. After the user
accepts the input by pressing [RETURN], the input
string is displayed on the screen with the PRINT
command)
SPECIAL NOTES: This is similar to GFA Basic's INPUT AS command.
------------------------------------------------------------------
KEYWORD: STRICT
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: BAUD
PARAMETERS: 1) Baud Rate
EXPLANATION: Changes the current baud rate to the specified baud
rate, if it is valid.
-- HagScript Manual -- ( 9 )
EXAMPLES: BAUD 2400
(changes to 2400 Baud)
SPECIAL NOTES: The following baud rates are valid: 50, 75, 110,
134, 150, 200, 300, 600, 1200, 1800, 2000, 2400,
3600, 4800, 9600, and 19200.
------------------------------------------------------------------
KEYWORD: LINEFEED
PARAMETERS: 1) Linefeed value
EXPLANATION: Changes the Linefeeds to either ON or OFF or TOGGLES
it. A value of 0 turns Linefeed OFF; a value of
1 turns the Linefeeds ON; and a value of -1 TOGGLES
the status of the Linefeeds.
EXAMPLES: LINEFEED 1
(Turns Linfeeds ON)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DUPLEX
PARAMETERS: 1) Duplex value
EXPLANATION: Either selects Half or Full Duplex, or TOGGLES the
status of the Duplex. A value of 0 selects Full
Duplex; a value of 1 selects Half Duplex; and a value
of -1 toggles between Half and Full Duplex.
EXAMPLES: DUPLEX 0
(Selects Full Duplex)
SPECIAL NOTES:
------------------------------------------------------------------
1 KEYWORD: CLS
PARAMETERS: none
EXPLANATION: Clears the screen (Terminal).
EXAMPLES: CLS
SPECIAL NOTES: This is similar to GFA Basic's CLS command.
------------------------------------------------------------------
KEYWORD: DIAL
-- HagScript Manual -- ( 10 )
PARAMETERS: none
EXPLANATION: Switches to Dial Mode
EXAMPLES: DIAL
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: MAIN
PARAMETERS: none
EXPLANATION: Switches to Main Menu
EXAMPLES: MAIN
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: INKEY
PARAMETERS: none
EXPLANATION: Waits for a single keypress. The key pressed is
stored in the System variable INPUT.
EXAMPLES: INKEY
PRINT 1|1|You pressed: ~#INPUT#
(Waits for a keypress, and displays the key pressed
on the screen.)
SPECIAL NOTES: This is similar to GFA Basic's INP(2) command.
------------------------------------------------------------------
KEYWORD: FILESELECT
PARAMETERS: 1) Path
2) Default file
3) Message to be displayed
EXPLANATION: This command places a file selector box on the
screen with which the directory of a disk can be
shown and a file an be selected.
The Path Parameter contains the name of the disk
drive and folder that is to be shown. If no disk
drive is given, the current disk drive will be
shown. The Default Parameter is the name of the
file that is to be shown when the file selector box
appears. The Message Parameter is a string of text
that will appear on top of the screen that the user
can read.
-- HagScript Manual -- ( 11 )
The chosen file that will be selected after the OK
button of the file selector box is clicked on is
stored in the System Variable INPUT.
EXAMPLES: FILESELECT A:*.*|HAGTERM.TXT|Select The File to View
TYPE ~#INPUT#
(Displays a file selector box with the directory
listing of all files on Drive A:. The file
HAGTERM.TXT is the default file. The message
"Select The File to View" is displayed on top of the
screen. The chosen file is then displayed onto the
screen with the TYPE command.)
SPECIAL NOTES: This is similar to GFA Basic's FILESELECT command.
------------------------------------------------------------------
KEYWORD: MACRO
PARAMETERS: 1) Number of Macro
EXPLANATION: Performs the specified Macro. Macro #1 specifies
Macro F1, Macro #2 is Macro F2, etc.
EXAMPLES: MACRO 12
(Performs the Macro #12, or Macro Shift-F2)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: STATUS
PARAMETERS: 1) Value of terminal status
EXPLANATION: Turns ON or OFF or TOGGLES the display of the status
line on the terminal screen. A value of 0 specified
Status Line OFF; a value of 1 specifies Status
Line ON; and a value of -1 TOGGLES the Terminal
status display.
EXAMPLES: STATUS 1
(Turns on the Terminal Status Line)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: ALERT
PARAMETERS: 1) Alert ICON type
2) Message to be displayed in the Alert Box
3) Default Button
-- HagScript Manual -- ( 12 )
4) List of the names of the button
EXPLANATION: It will display an Alert Box, which will allow the
user to make a choice of up to three buttons.
Parameter 1=ICON Type: This defines the symbol that is to appear
in the left half of the alert box symbol.
The following symbols are available:
0 = No Symbol
1 = Explanation Mark
2 = Question Mark
3 = Stop Sign
Parameter 2= Message: This string is the text that will appear
in the Alert Box. Four lines with a
maximum of 30 characters are allowed.
The lines are seperated with a "\"
character.
Parameter 3= Default: This sets the default mouse button that
will be highlighted in the Alert Box.
This button can be selected by simply
pressing RETURN or ENTER, as well as
being selected with the mouse button.
Parameter 4= Buttons: This string contains the text for the
menu buttons. The maximum text length
per button is 8 characters. The text of
the individual buttons are seperated by a
"\" character. A maximum of three
buttons are permitted.
When the user makes a choice of a button, the number
of the button selected can be found in the System
Variable I.
EXAMPLES: ALERT 2|Please Select One of the\Following
Choice|1|HELP\OK\CANCEL
(Displays an Alert Box with a Question Mark with a
two line Message: Line 1 says "Please Select One of
the"; line 2 says "Following Choices". There are
three possible buttons: "HELP", "OK", and "CANCEL".
The first button is the default button and is
highlighted.)
SPECIAL NOTES: This is similar to GFA Basic's ALERT command.
------------------------------------------------------------------
KEYWORD: MENU
PARAMETERS: 1) Menu command
EXPLANATION: Equivalent to selecting the specified Menu Item from
the Main Menu.
-- HagScript Manual -- ( 13 )
EXAMPLES: MENU Save Defaults
(Equivalent to selecting "Save Defaults" menu item
from the Main Menu, which would allow you to save
most defaults.)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIR
PARAMETERS: 1) Path/Wildcards
EXPLANATION: Displays a directory listing of the specified path.
EXAMPLES: DIR A:\*.*
(Displays a directory of all files on the root
directory of Drive A:)
SPECIAL NOTES: Wildcards are allowed.
------------------------------------------------------------------
KEYWORD: EXECUTE
PARAMETERS: 1) Program filename
2) Command line to be passed
EXPLANATION: Executes the specified program and passes to it the
specified command line.
EXAMPLES: EXECUTE ARC.TTP|v GAME.ARC
(Executes the program "ARC.TTP" and sends to that
program the command line "v GAME.aRC")
SPECIAL NOTES: This is similar to GFA Basic's EXEC command.
------------------------------------------------------------------
KEYWORD: LOADDIAL
PARAMETERS: 1) Filename
EXPLANATION: Loads in the specified dial directory from the disk.
EXAMPLES: LOADDIAL B:\TEST.DIR
(Loads int he dial directory TEST.DIR from the root
directory of drive B:.)
SPECIAL NOTES:
------------------------------------------------------------------
-- HagScript Manual -- ( 14 )
KEYWORD: LOADDEF
PARAMETERS: 1) Defaults filename
EXPLANATION: Loads in the specified defaults file from the disk.
EXAMPLES: LOADDEF A:\NEW.DEF
(Loads in the Defaults file NEW.DEF from the root
directory of Drive A:.)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: IF
PARAMETERS: 1) First statement
2) Operation
3) Second statement
4) HagScript command to be performed
EXPLANATION:
This command makes it possible to make one command
operation only when a logical condition is
fulfilled. The following example should clarify
this:
IF ]A[|=|1|PRINT 1|1|Numeric Variable A equals 1
In this case, whenever the Numeric Variable A is
equal to the value 1, then the message "Numeric
Variable A equals 1" is displayed.
The First and Second statements (Parameter 1 and 3)
can be any string or value. The Operation
(Parameter 2) must be one of the following:
= (equals to)
< (is less than)
> (is bigger than)
<= (is less than or equal to)
>= (is bigger than or equal to)
<> (is not equal to)
Whenever the condition between the First and Second
statements are met, then the HagScript command in
Parameter 4 is performed.
EXAMPLES: LET ]A[|0
LABEL AGAIN
LET ]A[|]A[+1
LET ]Y[|~#CURSOR.Y#+1
PRINT 1|]Y[|Numeric Variable A is equal to ]A[
IF ]A[|<=|10|GOTO AGAIN
CLS
PRINT 1|1|That's it!
-- HagScript Manual -- ( 15 )
(Displays the numbers 1 through 10 on the screen,
followed by clearing the screen and displaying the
text "That's it!".)
SPECIAL NOTES: This command is comparable to GFA Basic's IF ...
THEN command.
------------------------------------------------------------------
KEYWORD: DO
PARAMETERS:
EXPLANATION: NOT COMPLETED YET!
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: GOTO
PARAMETERS: 1) Label name to GOTO
EXPLANATION: Branches further execution to the Label name
specified. The label name corresponds to the name
set by the "LABEL" command.
EXAMPLES: LABEL again
LET }A{|}Y{+1
PRINT 1|}A{|This is a test...
GOTO again
(prints the text "This is a test..." onto the screen
continuosly, one after another.)
SPECIAL NOTES: This command searches the whole Script for a
corresponding Label command with the specified
name, and branches to the first found
correcsponding label.
------------------------------------------------------------------
KEYWORD: GOTOL
PARAMETERS: 1) Line number
EXPLANATION: Further HagScript command execution jumps to the
specified line number.
EXAMPLES: PRINT 5|5|Hi!
GOTOL
-- HagScript Manual -- ( 16 )
(Displays on the screen the string "Hi!"
continuously next to each other.)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: LET
PARAMETERS: 1) Name of a String of Numeric variable
2) Function or String of the specified variable
EXPLANATION: If the specified variable is a String, then that
variable is assigned the String specified in
Parameter 2.
However, if the specified variable is Numeric, then
HagTerm performs the specified function and assigns
a numeric value to the specified variable. The
function is similar to other functions like in a
Basic interepter. The following operations are
allowed:
INT(x) (takes the integer portion of x)
ABS(x) (returns the absolute value of x)
FIX(x) (returns a whole number)
SGN(x) (returns the sign of x:
if x is negative, SGN(x)=-1
if x is positive, SGN(x)=1
if x equals 0, SGN(x)=0)
RND(x) (generates a random number from 0 and 1)
SQR(x) (returns the square root of x)
EXP(x) (calculates the xth power to the base of
the number)
LGN(x) (calculaes the natural log of x)
FRC(x) (returns the fractional value of x,
removing the whole number value)
LOG(x) (returns the log of x in base 10)
SIN(x), COS(x), TAN(x), ATN(x), RAD(x), DEG(x) (are
self explanatory)
FAC(x) (self-defined factorial)
EXAMPLES: LET ]A[|3*10
LET ]B[|SGN(100)*10
LET ]C[|INT(1.7)
LET ]D[|FRC(3.4)
LET ]E[|(SQR(9)*INT(2.3)*]A[)+]C[
PRINT 1|1|]A[
PRINT 1|2|]C[
PRINT 1|3|]D[
PRINT 1|4|]E[
(prints to the screen the values 30, 10, 1, 0.4, and
181)
SPECIAL NOTES: This has been developed using the routines found
in the book "Programming with GFA Basic 3.0"
-- HagScript Manual -- ( 17 )
------------------------------------------------------------------
1 KEYWORD: SGET
PARAMETERS: 1) String Variable Name
EXPLANATION: Copies the entire screen into a String variable.
EXAMPLES: SGET }A{
(Copies the contents of the screen into the string
variable A)
SPECIAL NOTES: The variable with the contents of the string will
eat up 32K of memory.
This is similar to GFA Basic's SGET command.
------------------------------------------------------------------
1 KEYWORD: SPUT
PARAMETERS: 1) String variable with the screen contents
EXPLANATION: Copies a string variable with the screen contents
(that was specified in the SGET command) into the
current screen.
EXAMPLES: SPUT }A{
(Puts the contents of the string variable A onto the
screen.)
SPECIAL NOTES: THE SYSTEM WILL CRASH IF THE STRING VARIABLE DOES
NOT CONTAIN VALID SCREEN CONTENTS!
This is similar to GFA Basic's SPUT command.
------------------------------------------------------------------
1 KEYWORD: DRAW
PARAMETERS: 1) A String Variable
EXPLANATION: With DRAW an imaginary marker will be moved over the
screen and is able to draw. This closely resembles
the programming language LOGO. The individual
commands are given in strings. The commands are:
FD n FORWARD moves the Pen n Pixels forwards
BK n BACKWARD moves the Pen n Pixels backwards
SX x SCALE X scales the Pen movement for FD and BK
SY y SCALE Y with the given scaling factor
SX and SY works on n only with the commands FD
-- HagScript Manual -- ( 18 )
and BK. The scaling is turned off with
SX0 and SY0
LT w LEFT TURN gives the angle w around which the
drawing direction is to turn to the
left
RT w RIGHT TURN opposite to the right
TT w TURN TO returns the current angle w for this
the following assignments:
0
|
270 Zero Point 90
|
180
(the input for w=angle is in degrees)
MA x,y MOVE ABSOLUTE moves the Pen to the absolute
Coordinates x and y
DA x,y DRAW ABSOLUTE moves the Pen to the absolute
Coordinates x and y and draws a
line in the current color from
the last Position to the point
(x,y)
MR xr,yr MOVE RELATIVE like MA, however moves to the
last position
DR xr,yr DRAW RELATIVE like DR, however moves to the
last position
(See the "List of System Variables" for more info)
EXAMPLES: DRAW mx 320,200 tt 0
DRAW fd 45 rt 90 fd 45 rt 90 fd 45 rt 90 fd 45
DRAW bk 90 rt 90 bk 90 rt 90 bk 90 rt 90 bk 90
(Draws a small rectangle)
SPECIAL NOTES: The above text was copied from the "GFA Basic 3.0"
manual from MichTron, since the command used the
exact same format. I'm sorry that I had to do
this, MichTron (or ANTIC!)...
This is similar to GFA Basic's DRAW command.
------------------------------------------------------------------
1 KEYWORD: PLOT
PARAMETERS: 1) X position
2) Y position
-- HagScript Manual -- ( 19 )
EXPLANATION: Draws a point with the coordinates x and y on the
screen.
EXAMPLES: PLOT 50|50
(Draws a point at coordinates 50,50)
SPECIAL NOTES: This is similar to GFA Basic's PLOT command.
------------------------------------------------------------------
1 KEYWORD: LINE
PARAMETERS: 1) First X position
2) First Y position
3) Second X position
4) Second Y position
EXPLANATION: Draws a line between the first x,y coordinates and
the second x,y coordinates.
EXAMPLES: LINE 50|100|500|150
(Draws a diagonal line from coordinates 50,100 to
coordinates 500,150)
SPECIAL NOTES: This is similar to GFA Basic's LINE command.
------------------------------------------------------------------
1 KEYWORD: BOX
PARAMETERS: 1) Upper-Left X position
2) Upper-left Y position
3) Lower-right X position
4) Lower-right Y position
EXPLANATION: Draws a rectangle at the specified positions.
EXAMPLES: BOX 10|10|20|20
(Draws a square)
SPECIAL NOTES: This is similar to GFA Basic's BOX command.
------------------------------------------------------------------
1 KEYWORD: CIRCLE
PARAMETERS: 1) Center X coordinate
2) Center Y coordinate
3) Radius of circle
EXPLANATION: Draws a circle at the specified location with the
specified radius.
EXAMPLES: CIRCLE 50|50|25
-- HagScript Manual -- ( 20 )
SPECIAL NOTES: This is similar to GFA Basic's CIRCLE command.
------------------------------------------------------------------
1 KEYWORD: COLOR
PARAMETERS: 1) Color number (0-3 in lo-res, 0-1 in hi-res)
EXPLANATION: Chooses the specified color number to be used in
graphics commands like PLOT, BOX, LINE, etc.
EXAMPLES: COLOR 3
(chooses Color #3)
SPECIAL NOTES: This is similar to GFA Basic's COLOR command.
------------------------------------------------------------------
1 KEYWORD: SETCOLOR
PARAMETERS: 1) Color number
2) Red value of color
3) Green value of color
4) Blue value of color
EXPLANATION: Changes each color (only works in med-res) to the
specifed Red, Green, & Blue values.
EXAMPLES: SETCOLOR 2,7,7,7
(changes color #2 to pure white)
SETCOLOR 3,7,0,0
(changes color #3 to red)
SPECIAL NOTES: This is similar to GFA Basic's SETCOLOR command.
------------------------------------------------------------------
KEYWORD: DEFTEXT
PARAMETERS: 1) Color
2) Attribute
3) Angle
4) Height
EXPLANATION: Sets the appearance of a character string that is
displayed with the TEXT command.
The Color Parameter contains the color of the text,
ranging from 0 to 15. The Attribute Parameter
contains the attributes of the text. These coan be
conbined by combining the following identification
numbers:
-- HagScript Manual -- ( 21 )
0 - Normal
1 - Bold
2 - Light
4 - Italic
8 - Underlined
16 - Outlined
The Angle Parameter sets the direction of the text
output. The following values are allowed:
0 - Preset, from left to right
900 - From bottom to top
1800 - Upside down, from right to left
2700 - Backwards from top to bottom
The Height Parameter gives the height of an upper
case letter in pixels. Only the following script
heights are readable with normal character sets:
4 - Icon script height
6 - Small script height
13 - Normal script height
32 - Especially large script height
EXAMPLES: DEFTEXT 1|9|0|32
TEXT 50|15|Hagop is the BEST!
(Displays a string of text in color 1 (usually
black), in a bold underlined text, and in a
especially large script height.)
SPECIAL NOTES: This is similar to GFA Basic's DEFTEXT command.
------------------------------------------------------------------
1 KEYWORD: TEXT
PARAMETERS: 1) X pixel position
2) Y pixel position
3) Text to be displayed
EXPLANATION: Displays the specified text string as a graphic text
at the specified X and Y coordinates. This point is
located at the left corner of the first character of
the text string.
The graphic text can be given attributes with the
DEFTEXT command.
EXAMPLES: TEXT 100|150|This is text
(Displays the string "This is text" with the font
specified by DEFTEXT at the 100 X pixel and 150 Y
pixel.)
SPECIAL NOTES: This is similar to GFA Basic's TEXT command.
------------------------------------------------------------------
-- HagScript Manual -- ( 22 )
KEYWORD: ACCESS
PARAMETERS: 1) Access status value
EXPLANATION: When the Access status value is 1, then no
input/output will occur between the user and the
system. Only the HagScript commands will function.
For instance, the user cannot change between Modes
when Access is equal to 1. When the value is 0,
then everything will operate. When the value is -1,
then the Access will TOGGLE between a value of 0 and
a value of 1.
EXAMPLES: ACCESS 1
(Turns Access to a value of 1)
SPECIAL NOTES: The STOP command automatically sets Access to 0.
------------------------------------------------------------------
KEYWORD: STOP
PARAMETERS: none
EXPLANATION: Stops further execution of other HagScript commands.
EXAMPLES: STOP
SPECIAL NOTES: This command will also abort any WAIT or DELAY
commands.
------------------------------------------------------------------
KEYWORD: DELETE
PARAMETERS: 1) File to be deleted
EXPLANATION: Deletes the specified files. Wildcards are allowed.
EXAMPLES: DELETE A:\*.*
(Deletes all files on the root directory of Drive
A:.)
SPECIAL NOTES: The deleted files are deleted permanently.
This is similar to GFA Basic's KILL command.
------------------------------------------------------------------
KEYWORD: MFOLDER
PARAMETERS: 1) Folder name
EXPLANATION: Creates the specified folder.
-- HagScript Manual -- ( 23 )
EXAMPLES: MFOLDER AUTO
(Creates a folder named AUTO)
SPECIAL NOTES: This is similar to GFA Basic's MKDIR command.
------------------------------------------------------------------
KEYWORD: DFOLDER
PARAMETERS: 1) Folder to be deleted
EXPLANATION: Deletes the specified folder
EXAMPLES: DFOLDER AUTO
(Deletes the folder named AUTO and all files inside
that folder)
SPECIAL NOTES: This is similar to GFA Basic's RMDIR command.
------------------------------------------------------------------
KEYWORD: TYPE
PARAMETERS: 1) Filename to be displayed
EXPLANATION: Displays the specified file to the screen.
EXAMPLES: TYPE A:\HAGTERM.TXT
(Displays the filename A:\HAGTERM.TXT)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: COPY
PARAMETERS: 1) Source filename
2) Destination filename
EXPLANATION: Copies the specified Source file to the specified
Destination file.
EXAMPLES: COPY A:\HAGTERM.PRG|C:\TERM\HAGTERM.PRG
(Copies the file HAGTERM.PRG from Drive A: to Drive
C: into the folder "TERM")
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: EDITOR
PARAMETERS: none
-- HagScript Manual -- ( 24 )
EXPLANATION: Switches to Editor mode
EXAMPLES: EDITOR
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: CAPTURE
PARAMETERS: 1) Capture status value
EXPLANATION: Turns ON or OFF or TOGGLES the Capture (as ASCII)
status. A value of 0 will turn Capture OFF; a value
of 1 will turn Capture ON; a value of -1 will TOGGLE
the Capture status.
EXAMPLES: CAPTURE 0
(Turns Capture OFF)
SPECIAL NOTES: When Capture is ON, it is equivalent to "Download
ASCII". However, you must first specify a
filename with the OPENCAP command.
------------------------------------------------------------------
KEYWORD: OPENCAP
PARAMETERS: 1) Capture filename
EXPLANATION: Opens up a capture file with the specified filename.
You must use the CAPTURE command to start capturing
text, however.
EXAMPLES: OPENCAP BBS.CAP
CAPTURE 1
.
.
.
CLOSECAP
(opens a capture file named BBS.CAP; then it turns
the capturing ON, and afterwards, closes the capture
file)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: CLOSECAP
PARAMETERS: none
EXPLANATION: Closes the capture file
EXAMPLES: See above
-- HagScript Manual -- ( 25 )
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: RENAME
PARAMETERS: 1) Source Filename
2) New Filename
EXPLANATION: Will Rename the Source File with a new Filename.
EXAMPLES: RENAME A:\HAGTERM.TXT|A:\HAGTERM.DOC
(Will rename the file HAGTERM.TXT into HAGTERM.DOC)
SPECIAL NOTES: This command can also be used to MOVE files from
one directory/folder into another
directory/folder.
This is similar to GFA Basic's RENAME AS command.
------------------------------------------------------------------
KEYWORD: DIALNUM
PARAMETERS: 1) Number of the Dial Item.
EXPLANATION: Will dial the corresponding Dial Item.
EXAMPLES: DIALNUM 2
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIALNAME
PARAMETERS: 1) The name (or part of the name) of a Dial Item
EXPLANATION: Will search the Dial Directory till the specified
string matches one of the Dial Items.
EXAMPLES: DIALNAME grave
(will dial any Dial Item that has the string "grave"
in it, such as "Dead Graveyard")
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIAL.CONFIG
PARAMETERS:
EXPLANATION:
EXAMPLES:
-- HagScript Manual -- ( 26 )
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIAL.LOG
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIAL.AUTODIAL
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIAL.AUTO.REDIAL
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIAL.AUTO.SCRIPT
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DIAL.AUTO.DEFAULT
PARAMETERS: 1) Value of Dialing Method, AutoDialer autoload
Defaults.
-- HagScript Manual -- ( 27 )
EXPLANATION: A value of 0 specifies the autodialer to not load
the specified Defaults file upon connection when
Autodialing. A value of 1 is the opposite.
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: PARITY
PARAMETERS: 1) Parity value
EXPLANATION: Changes the Parity value. A value of 0 specifies No
Parity; 1 specifies Even Parity, and 2 specifies Odd
Parity.
EXAMPLES: PARITY 1
(chooses Even Parity)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: FLOW
PARAMETERS: 1) Value of Flow Control
EXPLANATION: Changes Flow Control method. A value of 0 is "No
Flow Control", a value of 1 is "Xon/Xoff", and a
value of 2 is "RTS/CTS".
EXAMPLES: FLOW 2
(Chooses Flow Control RTS/CTS)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: STOPBITS
PARAMETERS: 1) Stop Bits value (1, 1.5, or 2)
EXPLANATION: Changes the value of the Stop Bits.
EXAMPLES: STOPBITS 2
(chooses 2 stop bits)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: CHAR
-- HagScript Manual -- ( 28 )
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: BUFFER
PARAMETERS: 1) Capture to Buffer status value
EXPLANATION: Either turns ON or OFF the capture to Buffer status,
which will store the incoming data from the serial
port and can then be edited through the Editor. A
value of 0 will turn Buffer OFF; a value of 1 will
turn Buffer ON; a value of -1 will TOGGLE the
Buffer.
EXAMPLES: BUFFER 0
(Turns OFF the Capture to Buffer)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: AUTOPAUSE
PARAMETERS: 1) Autopause status value
EXPLANATION: Turns ON or OFF or TOGGLES the Autopause option. If
the specified value is 0, then Autopause is OFF; a
value of 1 will turn Autopause ON; and a value of -1
will TOGGLE the status of Autopause.
EXAMPLES: AUTOPAUSE 1
(Turns Autopause ON)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: PRINTER
PARAMETERS: 1) Printer status value
EXPLANATION: Either turns ON or OFF or TOGGLES the Printer
output. A value of 0 will turn OFF the Printer
output; a value of 1 will turn ON the Printer
output; a value of -1 will TOGGLE the Printer
output.
EXAMPLES: PRINT -1
-- HagScript Manual -- ( 29 )
(TOGGLES the Printer Output)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: KEYCLICK
PARAMETERS: 1) Keyclick status value
EXPLANATION: Turns ON or OFF or TOGGLES the keyclick sound. If
the specified value is 1, then Keyclick will be OFF;
a value of 0 will turn Keyclick ON; and a value of
-1 will TOGGLE the status of the Keyclick sound.
EXAMPLES: KEYCLOCK 0
(Turns on the Keyclick)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: VT52
PARAMETERS: 1) VT52 status value
EXPLANATION: Turns ON or OFF or TOGGLES the VT52 option. If the
specified value is 1, then VT52 is OFF; a value of 0
will turn VT52 ON; and a value of -1 will TOGGLE
VT52.
EXAMPLES: VT52 1
(Turns off VT52)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: REDIAL
PARAMETERS: 1) Number of Redials
EXPLANATION: Specifies the number of times that the Autodialer
should redial a specific number before returning the
control to the user.
EXAMPLES: REDIAL 5
(Specifies five redials.)
SPECIAL NOTES: This can also be set through the Setup Dialog Box
in the Dial Mode.
------------------------------------------------------------------
-- HagScript Manual -- ( 30 )
KEYWORD: REDIAL.TIME
PARAMETERS: 1) Number of seconds to wait before redial
EXPLANATION: Specifies the number of seconds to wait when
Autodialing before issuing a Redial.
EXAMPLES: REDIAL.TIME 30
(Specifies a Redial Time of 30 seconds.)
SPECIAL NOTES: This can also be set through the Setup dialog box
in Dial Mode.
------------------------------------------------------------------
KEYWORD: MONO.LINES
PARAMETERS: 1) Status of the Extended terminal screen lines
EXPLANATION: Either turns ON or OFF or TOGGLES the 48 lines in
the terminal screen. A value of 0 specified 24 lines
in the terminal screen (normal); a value of 1
specifies 48 lines in the terminal screen (extended);
and a value of -1 toggles between 24 and 48 lines.
EXAMPLES: MONO.LINES 1
(Selects 48 lines in Terminal screen (extended).)
SPECIAL NOTES: 48 lines per screen is only available in
high resoloution.
------------------------------------------------------------------
KEYWORD: BELL
PARAMETERS: 1) Bell status value
EXPLANATION: Turns ON or OFF or TOGGLES the Bell status. A value
of 1 turns the Bell OFF; a value of 0 turns the Bell
ON; a value of -1 toggles the status of the Bell.
EXAMPLES: BELL 1
(Turns the Bell OFF)
SPECIAL NOTES: The Bell is the bell sound that is made by either
the Dialer (during connection) or through the
terminal screen (by pressing the CONTROL+G keys)
or by clicking the mouse button outside a dialog
box.
------------------------------------------------------------------
KEYWORD: PRINTFILE
PARAMETERS: 1) File to print
-- HagScript Manual -- ( 31 )
EXPLANATION: Prints the specified file to the printer.
EXAMPLES: PRINTFILE A:\HAGTERM.TXT
(Prints to the printer the file HAGTERM.TXT in the
root directory of drive A:.)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: COLORTOG
PARAMETERS: none
EXPLANATION: Inverses the foreground and the background colors.
EXAMPLES: COLORTOG
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: WAITTIME
PARAMETERS: 1) Time string with the format HH:MM:SS
EXPLANATION: Halts execution of further HagScript commands until
the System Time is equal or more than the specified
time. However, only the HagScript commands will be
halted, all other functions will function properly.
EXAMPLES: WAITTIME 10:00:00
PRINT 1|1|Hi!
(Waits till the time is 10 o'clock, after which it
will display the string "Hi!")
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: WAITDATE
PARAMETERS: 1) Date string with the format MM/DD/YY
EXPLANATION: Halts execution of further HagScript commands until
the System Date is equal or more than the specified
date. However, only the HagScript commands will be
halted, all other functions will function properly.
EXAMPLES: WAITDATE 08/23/89
PRINT 1|1|Hi!
(Waits till the date is August 23rd, after which it
will display the string "Hi!")
-- HagScript Manual -- ( 32 )
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: WAITTIMER
PARAMETERS: 1) Timer string with the format HH:MM:SS
EXPLANATION: Halts execution of further HagScript commands until
the System Timer is equal or more than the specified
timer. However, only the HagScript commands will be
halted, all other functions will function properly.
EXAMPLES: WAITTIMER 10:00:00
PRINT 1|1|Hi!
(Waits till the timer is 10 o'clock, after which it
will display the string "Hi!")
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: TIMER
PARAMETERS: 1) Timer status value
EXPLANATION: Turns ON or OFF or TOGGLES the Timer. A value of 0
turns the Timer OFF; a value of 1 turns the Timer
ON; a value of -1 TOGGLES the status of the Timer.
EXAMPLES: TIMER 1
(Turns the Timer ON)
SPECIAL NOTES: If you are in the Main Menu or Editor Mode, the
upper right hand clock will switch to Timer mode
and will display the Timer when you turn ON the
timer, and vice versa.
------------------------------------------------------------------
KEYWORD: LOADSCRIPT
PARAMETERS: 1) Script filename
EXPLANATION: Clears the current HagScript and loads in the
specified HagScript. It then automatically executes
the new loaded HagScript.
EXAMPLES: LOADSCRIPT JUNGLE.HAG
(Loads and executes the script "JUNGLE.HAG")
SPECIAL NOTES:
------------------------------------------------------------------
-- HagScript Manual -- ( 33 )
KEYWORD: PLAY
PARAMETERS: none
EXPLANATION: Re-Plays the current HagScript from the first
command.
EXAMPLES: PLAY
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: SETMACRO
PARAMETERS: 1) Macro number
2) Macro String
EXPLANATION: Defines the specified Macro number to the specified
Macro string. Macro number 1 is Macro F1, number 2
is Macro F2, and so on. Macro number 11 is
Shift+F1, etc.
EXAMPLES: MACRO 3|This is Macro F3
(Defines Macro F3 with the string "This is Macro
F3")
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: AUXCLEAR
PARAMETERS: none
EXPLANATION: Clears the Serial port buffer.
EXAMPLES: AUXCLEAR
SPECIAL NOTES: This is similar to pressing ALT-X in the Terminal
Mode.
------------------------------------------------------------------
KEYWORD: SETTIME
PARAMETERS: 1) Time strin in the format HH:MM:SS
EXPLANATION: Sets the System Time to the specified Time.
EXAMPLES: SETTIME 15:05:30
(Sets the system time to 15:05:30, or five past three
and thirty seconds, P.M.)
SPECIAL NOTES:
-- HagScript Manual -- ( 34 )
------------------------------------------------------------------
KEYWORD: SETDATE
PARAMETERS: 1) Date string in the format MM/DD/YY
EXPLANATION: Sets the System Date to the specified Date.
EXAMPLES: SETDATE 08/12/89
(Sets the date to August 12th, 1989)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: LOADBUFFER
PARAMETERS: 1) Filename
EXPLANATION: Loads into the Buffer the specified file.
EXAMPLES: LOADBUFFER A:\HAGTERM.TXT
(Loads the file A:\HAGTERM.TXT into the buffer)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: UPPER
PARAMETERS: 1) Variable name
EXPLANATION: Capitalizes the specified Variable.
EXAMPLES: LET }A{|This is A TeST!
UPPER }A{
PRINT 1|1|}A{
(Prints to the screen the string "THIS IS A TEST!")
SPECIAL NOTES: This is similar to GFA Basic's UPPER$() command.
------------------------------------------------------------------
KEYWORD: DCOPY
PARAMETERS: none
EXPLANATION: Executes the DCOPY program under the filename
specified in the Defaults.
EXAMPLES: DCOPY
SPECIAL NOTES:
------------------------------------------------------------------
-- HagScript Manual -- ( 35 )
KEYWORD: UPLOAD
PARAMETERS: 1) Protocol to use:
1 - Xmodem 2 - Xmodem 1K
3 - Ymodem Batch 4 - ASCII
2) File to upload
EXPLANATION: Uploads a specified file using a specified protocol
EXAMPLES: UPLOAD 2|HAGTERM3.PRG
(Uploads the file "HAGTERM3.PRG" using Xmodem 1K)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD: DOWNLOAD
PARAMETERS: 1) Protocol to use:
1 - Xmodem 2 - Xmodem 1K
3 - Ymodem Batch
2) Filename/path to download
EXPLANATION: Downloads a file under specified filename using the
specified protocol.
EXAMPLES: DOWNLOAD 3|A:\*.*
(Downloads files using Ymodem Batch onto drive A:)
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD:
PARAMETERS:
EXPLANATION:
EXAMPLES:
SPECIAL NOTES:
------------------------------------------------------------------
KEYWORD:
PARAMETERS:
EXPLANATION:
EXAMPLES:
-- HagScript Manual -- ( 36 )
SPECIAL NOTES:
-- HagScript Manual -- ( 37 )